
public class zy13 {
	public static double fun(double x){
		return 4-x*x;
	}
	public static double gmj(double a,double b,int fs)
	{
		int i;
		double s=0,area,dx=(double)(b-a)/fs;
		for(i=0;i<=fs-1;i++)
		{
			area=Math.abs((fun(a+dx*i)+fun(a+dx*(i+1)))*dx/2);
			s=s+area;
		}
		return s;
		
	}
	public static void main(String[] args){
		System.out.printf("%f\n",gmj(-2,2,10000));
	}
}
